package org.aeon.colorfulplanebattle.view.listener;

import org.aeon.colorfulplanebattle.flying.entity.Plane;

/**
 * @author: MissingAeon
 * @date: 2024/1/11 14:50
 * @description:
 */
public enum SustainAttackE implements Action {
    SUSTAIN_ATTACK;
    private static Plane myPlane;
    private boolean flag;

    public static void setMyPlane(Plane myPlane) {
        SustainAttackE.myPlane = myPlane;
    }

    @Override
    public void run() {
        if (flag) {
            myPlane.attack();
        }
    }

    @Override
    public boolean isFlag() {
        return flag;
    }

    @Override
    public void setFlag(boolean flag) {
        this.flag = flag;
    }
}
